package com.wangjiyuan.shiwupai.http;

import com.wangjiyuan.shiwupai.bean.first_food.FoodBean;
import com.wangjiyuan.shiwupai.bean.first_food.FoodClassBean;
import com.wangjiyuan.shiwupai.bean.first_food.FoodSortBean;
import com.wangjiyuan.shiwupai.config.UrlConfig;

import java.util.Map;

import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import rx.Observable;

import com.wangjiyuan.shiwupai.bean.guangchi.categorie.CategoryBean;
import com.wangjiyuan.shiwupai.bean.guangchi.evaluation.EvaluationBean;
import com.wangjiyuan.shiwupai.bean.guangchi.first.FirstBean;
import com.wangjiyuan.shiwupai.bean.guangchi.photo.PhotoBean;

/**
 * Created by wjy on 2016/11/25.
 */
public interface HttpInterfaces {
    //    食物百科
    @GET(UrlConfig.FirstFood.FOOD_PATH)
    Observable<FoodBean> getFoodObservable(@Path("categories") String path1, @Path("list") String path2,
                                           @QueryMap() Map<String, String> foodMap);

    //    营养素排序
    @GET(UrlConfig.FirstFood.FOOD_PATH)
    Observable<FoodSortBean> getSortObservable(@Path("categories") String path1, @Path("list") String path2,
                                               @QueryMap() Map<String, String> foodMap);

    //    食物百科分类详情列表
    @GET(UrlConfig.FirstFood.FOOD_CLASS_PATH)
    Observable<FoodClassBean> getFoodClassObservable(@QueryMap() Map<String, String> map);

    @GET(UrlConfig.CATEGORIES_PATH)
    Observable<CategoryBean> getTab(@QueryMap Map<String, String> map);

    @GET(UrlConfig.FEEDS_PATH)
    Observable<FirstBean> getFirst(@QueryMap Map<String, String> map);

    @GET(UrlConfig.FEEDS_PATH)
    Observable<EvaluationBean> getEvaluation(@QueryMap Map<String, String> map);

    @GET(UrlConfig.FEEDS_PATH)
    Observable<com.wangjiyuan.shiwupai.bean.guangchi.food.FoodBean> getFood(@QueryMap Map<String, String> map);

    @GET(UrlConfig.PHOTO_PATH)
    Observable<PhotoBean> getPhoto(@Path("id")String id,@QueryMap Map<String,String> map);
}
